package cn.wolfcode.luowowo.article.service.impl;

import cn.wolfcode.luowowo.article.domain.SiteCollect;
import cn.wolfcode.luowowo.article.domain.Viewpoint;
import cn.wolfcode.luowowo.article.mapper.SiteCollectMapper;
import cn.wolfcode.luowowo.article.service.ISiteCollectService;
import cn.wolfcode.luowowo.common.query.QueryObject;
import com.github.pagehelper.PageInfo;
import com.sun.prism.image.ViewPort;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service
public class SiteCollectServiceImpl implements ISiteCollectService {
    @Autowired
    private SiteCollectMapper siteCollectMapper;
    @Override
    public PageInfo query(QueryObject qo) {

        List<SiteCollect> list = siteCollectMapper.selectForList(qo);
        return new PageInfo(list);
    }

    public void save(SiteCollect record) {
        siteCollectMapper.insert(record);
    }

    public List<Viewpoint> selectViewPointByUserId(Long id) {
        return siteCollectMapper.selectViowPointByUserId(id);
    }


}
